<?php

// $Id$


require_once('tree_menu_loader.class.php');

class Tree_Menu_Loader_DB extends Tree_Menu_Loader {
	public function load_tree_menu($params) {
		$menu = false;

		if (array_key_exists('dbc', $params)) {
			if ($params['dbc'] instanceof DB_Connection) {
				$dbc = $params['dbc'];
				if (array_key_exists('table', $params)) {
					$table = addslashes($params['table']);


				} else {
					throw new TE_Tree_Menu('Missing key \'table\' in $params.');
				}
			} else {
				throw new TE_Tree_Menu('$params[\'dbc\'] is not DB_Connection.');
			}
		} else {
			throw new TE_Tree_Menu('Missing key \'dbc\' in $params.');
		}

		return $menu;
	}


	private function load_items_for_parent(DB_Connection $dbc, $parent_id) {
		$ret = false;



		return $ret;
	}
}